<?php
namespace app\common\model;
//
use think\Model;
class BisLocation extends BaseModel{
    
    public function getNormalLocationByBisId($bisId){
      $data=[
          'id'=>$bisId,
          'status'=>1,
      ];  
      $order=[
          'id'=>"desc",
      ];
        
      $result=$this->where($data)
              ->order($order)
              ->select();
      return $result;
        
    }
    //前台分店信息
    public function getNormalLocationsInId($ids){
        $data=[
            'id'=>['in', $ids],
            'status'=>1,
        ];
        
        return $this->where($data)->select();
    }
    //bisId是从当前所登陆的用户那里获取的id
    public function getNormalLocaltionsByBisId($bisId){
        $data=[
            "bis_id"=>$bisId,
        ];
        
        $order=[
            "id"=>"desc",
        ];
        
        return $this->where($data)->order($order)->select();
    }
    
    
}
